@extends('layouts.app')

@section('content')
<div class="container">


    <div class="row">
<table class="table">
  <thead class="thead-light">
    <tr>     
      <th scope="col">姓名</th>
      <th scope="col">状态</th>
      <th scope="col">地址</th>
      <th scope="col">ip</th>
      <th scope="col">手机号</th>
      <th scope="col">创建/更新</th>
    </tr>
  </thead>
  <tbody>
	@foreach ($patients as $patient)
	<tr>
		<td><a href="{{ route('patient.edit',['patient'=>$patient->id]) }}">{{ $patient->name }}</a></td>
		<td>
			@if ($patient->status>0):
				<img src="http://vip.wxpfbyy120.com/gongyi/{{$patient->id}}.jpg" width="300"/> 
			@endif;
		</td>
		<td>{{ $patient->address }}</td>
		<td>{{ $patient->ip }}</td>
		<td>{{ $patient->phone }}</td>
		<td>{{ $patient->created_at }}<br/>{{ $patient->updated_at }}</td>
	</tr>      
    @endforeach
</tbody>
</table>

    </div>

    {{ $patients->links('vendor.pagination.bootstrap-4') }}

</div>
@endsection
